<?php
/* @var $this PartnerIncomeController */
/* @var $model PartnerIncome */

$this->breadcrumbs=array(
	yii::t('base','Partner Incomes')=>array('index'),
);

$this->menu=array(
	array('label'=>'List PartnerIncome', 'url'=>array('index')),
	array('label'=>'Create PartnerIncome', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#partner-income-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo yii::t('base','Manage Partner Incomes')?></h1>

<?php echo CHtml::link(Yii::t('base','Advanced Search'),'#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'partner-income-grid',
	'dataProvider'=>$model->search(),
	'itemsCssClass'=>'responsive table table-striped table-bordered',
	'pager'=>array('class'=>'CLinkPager','hiddenPageCssClass'=>'','firstPageCssClass'=>'first paginate_button','htmlOptions'=>array('class'=>'dataTables_paginate paging_full_numbers"'),'header'=>""),
	'pagerCssClass'=>'pagination',
	'cssFile'=>false,
	'template'=>'{items}{summary}{pager}',
	'columns'=>array(
		//'partner_income_id',
		'user_name',
		'customer_name',
		'amount',
		//'create_time',
		//'update_time',
		array(
			'class'=>'CButtonColumn',
			'header'=>Yii::t('base','Operate'),
			'template'=>'{delete}{update}',
			'updateButtonImageUrl'=>array('class'=>'gicon-edit'),
			'updateButtonOptions'=>array('class'=>'btn btn-small'),
			'deleteButtonImageUrl'=>array('class'=>'gicon-edit'),
			'deleteButtonOptions'=>array('class'=>'btn btn-inverse btn-small'),
			'headerHtmlOptions'=>array(
				'style'=>'width:30%;',
			),
		),
	),
)); ?>
